<!DOCTYPE html>
<html>
<head>
<!-- Required meta tags-->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<!-- Your app title -->
<title><%=sails.config.application.title%></title>
<!-- Path to Fontawesome Library CSS
<link rel="stylesheet" href="<%=sails.config.application.baseUrl%>/plugins/font-awesome/css/font-awesome.min.css">-->
<link rel="stylesheet" href="<%=sails.config.application.baseUrl%>/plugins/themify-icons/themify-icons.css">

<!-- Path to Framework7 Library CSS-->
<link rel="stylesheet" href="<%=sails.config.application.baseUrl%>/plugins/framework7/css/framework7.min.css">
<link rel="stylesheet" href="<%=sails.config.application.baseUrl%>/plugins/framework7-Keypad/framework7.keypad.css">
<!-- Path to your custom app styles-->
<link rel="stylesheet" href="<%=sails.config.application.baseUrl%>/styles/mobile/app.css">
</head>
<body>
	<!-- Status bar overlay for full screen mode (PhoneGap) -->
	<div class="statusbar-overlay"></div>
	
	
	<!-- 
	<div class="panel-overlay"></div>
	<div class="panel panel-left panel-cover panel-menu">
	
		<div class="content-block">
			<div class="menu-logo"></div>
			<div class="menu-company">大连六元素科技有限公司</div>
		</div>
		
		<div class="list-block" id="menu-link">
			<ul>
				<li><a href="#" class="item-link item-content">
						<div class="item-media"><i class="ti-agenda"></i></div>
						<div class="item-inner"><div class="item-title">工作日志</div></div>
				</a></li>
				<li><a href="#" class="item-link item-content">
						<div class="item-media"><i class="ti-write"></i></div>
						<div class="item-inner"><div class="item-title">考勤</div></div>
				</a></li>
				<li><a href="<%=sails.config.application.appPrefix%>/note/list" class="item-link item-content">
						<div class="item-media"><i class="ti-receipt"></i></div>
						<div class="item-inner"><div class="item-title">请假条</div></div>
				</a></li>
				<li><a href="<%=sails.config.application.appPrefix%>/form/list" class="item-link item-content">
						<div class="item-media"><i class="ti-file"></i></div>
						<div class="item-inner"><div class="item-title">报表</div></div>
				</a></li>
				<li><a href="<%=sails.config.application.appPrefix%>/form/check" class="item-link item-content">
						<div class="item-media"><i class="ti-pencil-alt"></i></div>
						<div class="item-inner"><div class="item-title">审批</div></div>
				</a></li>
				<li><a href="#" class="item-link item-content">
						<div class="item-media"><i class="ti-crown"></i></div>
						<div class="item-inner"><div class="item-title">任务</div></div>
				</a></li>
				
				<li class="item-divider">&nbsp;</li>
				
				<li><a href="<%=sails.config.application.appPrefix%>/post/list" class="item-link item-content">
						<div class="item-media"><i class="ti-comments"></i></div>
						<div class="item-inner"><div class="item-title">同事圈</div></div>
				</a></li>
				<li><a href="#" class="item-link item-content">
						<div class="item-media"><i class="ti-clipboard"></i></div>
						<div class="item-inner"><div class="item-title">设备予约</div></div>
				</a></li>
				<li><a href="<%=sails.config.application.appPrefix%>/contacts" class="item-link item-content">
						<div class="item-media"><i class="ti-notepad"></i></div>
						<div class="item-inner"><div class="item-title">通迅录</div></div>
				</a></li>
			</ul>
		</div>
	</div> -->
	
	<!-- Views -->
	<div class="views">
		<!-- Your main view, should have "view-main" class -->
		<div class="view view-main">
			<!-- Pages container, because we use fixed-through navbar and toolbar, it has additional appropriate classes-->
			<div class="pages">
				<!-- Page, "data-page" contains page name -->
				<div data-page="index" class="page no-toolbar navbar-through index">
				
					<div class="navbar">
						<div class="navbar-inner">
							<div class="left">
								<!-- <a href="#" class="link icon-only open-panel"><i class="ti-list"></i></a> -->
							</div>
							<div class="center">工作台</div>
							<div class="right">
								<% if (login == true) { %>
								<a href="<%=sails.config.application.appPrefix%>/contacts/detail?userid=<%= req.session.user.userid%>" class="link icon-only"><i class="ti-user"></i></a>
								<% } %>
							</div>
						</div>
					</div>
				
					<div class="page-content">
					
						<table class="menu-grid">
							<tr>
								<td>
									<a href="<%=sails.config.application.appPrefix%>/note/list">
										<div class="flex flex-cc circle"><i class="ti-receipt"></i></div>
										<span>请假条</span>
									</a>
								</td>
								<td>
									<a href="<%=sails.config.application.appPrefix%>/form/list">
										<div class="flex flex-cc circle"><i class="ti-file"></i></div>
										<span>报表</span>
									</a>
									
								</td>
								<td>
									<a href="<%=sails.config.application.appPrefix%>/form/check">
										<div class="flex flex-cc circle"><i class="ti-pencil-alt"></i></div>
										<span>审批</span>
									</a>
								</td>
							</tr>
							<tr>
								<td>
									<a href="<%=sails.config.application.appPrefix%>/signin">
										<div class="flex flex-cc circle"><i class="ti-notepad"></i></div>
										<span>考勤</span>
									</a>
								</td>
								<td>
									<a href="<%=sails.config.application.appPrefix%>/vacations">
										<div class="flex flex-cc circle"><i class="ti-notepad"></i></div>
										<span>年假</span>
									</a>
								</td>
								<td class="blank"></td>
							</tr>
						</table>
						
						<div class="content-block-title"></div>
							
						<table class="menu-grid">
							<tr>
								<td>
									<a href="<%=sails.config.application.appPrefix%>/contacts">
										<div class="flex flex-cc circle"><i class="ti-notepad"></i></div>
										<span>通迅录</span>
									</a>
								</td>
								<td>
									<a href="<%=sails.config.application.appPrefix%>/post/list">
										<div class="flex flex-cc circle"><i class="ti-comments"></i></div>
										<span>同事圈</span>
									</a>
								</td>
								<td>
									<a href="<%=sails.config.application.appPrefix%>/news/list">
										<div class="flex flex-cc circle"><i class="ti-world"></i></div>
										<span>新闻公告</span>
									</a>
								</td>
							</tr>
						</table>
						
					</div>
					
				</div>
			</div>
			
		</div>
	</div>
	
	<% if (login == false) { %>
	<!-- Login-screen -->
	<div class="login-screen">
		<!-- Default view-page layout -->
		<div class="view">
			<div class="page">
				<!-- page-content has additional login-screen content -->
				<div class="page-content login-screen-content">
					<div class="login-screen-title">六元素移动办公系统</div>
					<div class="content-block center">
						<p>
							<i class="fa fa-times-circle" style="color:#ff3b30;font-size:1.2em"></i>
							本系统只能从微信登陆！
						</p>
					</div>
					
					<div class="content-block">
						<p>
							<a href="<%=AuthURL%>" class="button button-big button-fill color-cyan external">登陆</a>
						</p>
					</div>
					
					<div class="content-block login-copyright">
						Copyright (c) 2015 大连六元素科技有限公司
					</div>
					
				</div>
			</div>
		</div>
	</div>
	<% } %>
	
	<!-- Path to PhoneGap Library JS
	<script type="text/javascript" src="cordova.js"></script>-->
	
	<!-- Path to jQuery Library JS-->
	<script type="text/javascript" src="<%=sails.config.application.baseUrl%>/plugins/jquery/jquery.min.js"></script>
	
	<!-- Path to jQuery Validation JS-->
	<script type="text/javascript" src="<%=sails.config.application.baseUrl%>/plugins/jquery-validation/jquery.validate.min.js"></script>
	<script type="text/javascript" src="<%=sails.config.application.baseUrl%>/plugins/jquery-validation/messages_zh.js"></script>
	
	<!-- Path to jQuery Serialize-object JS-->
	<script type="text/javascript" src="<%=sails.config.application.baseUrl%>/plugins/jquery-serialize-object/jquery.serialize-object.min.js"></script>
	
	<!-- Path to Framework7 Library JS-->
	<script type="text/javascript" src="<%=sails.config.application.baseUrl%>/plugins/framework7/js/framework7.min.js"></script>
	<script type="text/javascript" src="<%=sails.config.application.baseUrl%>/plugins/framework7-Keypad/framework7.keypad.js"></script>
	
	<!-- Path to weixin-->
	<script src="<%=sails.config.application.baseUrl%>/js/mobile/sha1.js"></script>
	<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
	
	<!-- Path to sails.io -->
	<script src="<%=sails.config.application.baseUrl%>/js/dependencies/sails.io.js"></script>
	
	<script type="text/javascript" src="<%=sails.config.application.baseUrl%>/js/mobile/utils.js"></script>
	<script type="text/javascript" src="<%=sails.config.application.baseUrl%>/js/mobile/weixin.js"></script>
	<script type="text/javascript" src="<%=sails.config.application.baseUrl%>/js/mobile/app.js"></script>
	
	<script type="text/javascript">
		var wxoa = new WechatOA();
		<% if (login == false) { %>
		wxoa.loginScreen();
		<% }else{ %>
		wxoa.init('<%=sails.config.application.baseUrl%>','<%=sails.config.application.appPrefix%>', <%- JSON.stringify(req.session.user)%>);
		<% } %>
	</script>
</body>
</html>